'use strict';
var OplogModalDemo = angular.module('FusionStorUI.oplog', []);
OplogModalDemo.controller('OplogCtrl',['$scope','$modal', function($scope, $modal) {
    var modalInstance;
    $scope.open = function(url) {  
        $scope.item = {};
        modalInstance = $modal.open({  
            backdrop: 'static',       
            keyboard: false,
            templateUrl : url,
            controller : OplogModalInstanceCtrl,  
            resolve : { 
                item : function() {  
                    return $scope.item;  
                }  
            }  
        });  
    };  

    $scope.close = function() {
        modalInstance.dismiss('cancel');  
    }
}]); 
var OplogModalInstanceCtrl = function($scope, $modalInstance, item) {  
    $scope.item = item;  
    $scope.selected = {  
        item : $scope.item 
    };  
    $scope.ok = function() {  
        submit_oplog_export();
    };
    
    $scope.cancel = function() {  
        $modalInstance.dismiss('cancel');  
    };  
};  
  
